1. Apache Access LogEnter command cat/usr/local/apache2.4/conf/extra/httpd-vhosts.conf, enter, see,The access log for this virtual machine is inside the/logs/111.com-access_log, enter the command ls/usr/local/apache2.4/logs/, you can see the access
How to delete error. log, access. log files and methods to limit the size of Apache log files. log and error. the log file has never been moved. Today, a MYSQL database connection error
Have you found that the log files generated by Apache are day-to-day, not very big? If you installed apache on drive C, it would be terrible. In a few days, the hard disk will be full, which is terrible, is there a way to optimize the log to make it less big? The answer is yes.1. Stop the
One, Apache access logs do not log static filesMost of the site elements are static files, tablets, CSS, JS, etc., these elements can not be recordedvim/usr/local/apache2.4/conf/extra/httpd-vhosts.conf//Change to the followingChange the virtual host configuration file to the following:DocumentRoot "/data/wwwroot/www.123.com"ServerName www.111.comServeralias 111.c
An example of setting in Windows is as follows:Step 1: Delete the error. log and access. log files in The apache2/logs/directory.Step 2: Open the httpd. conf configuration file of Apache and find the following two configurations:Errorlog logs/error. LogCustomlog logs/access.
Today, I found that the disk D on my server is out of space. It's strange that there is no space of GB and I have installed an apache. How can I find that there is an access in the principle. the log file has a memory GB, Baidu access. log is an
Restrict Apache log access. log File Size
Rotatelogs is a simple program used with the Apache pipeline log function. You can configure the rotatelogs function of the Apache program in t
Article title: Apache log: access log (2 ). Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
3. process Statistics
UNIX can track every command run by every user. if you want to k
By default, Apache runs two log files: access_log (access log) and error_log (error log. Take a look at a typical acce
By default, Apache runs two log files: access_log (
profile to open it:# vim/usr/local/apache2.4/conf/httpd.confLoadModule Rewrite_module modules/mod_rewrite.soGet rid of this line of #.#/usr/local/apache2.4/bin/apachectl-tSyntax OK#/usr/local/apache2.4/bin/apachectl Graceful#/usr/local/apache2.4/bin/apachectl-m |grep RewriteRewrite_module (Shared)The module loads well and starts testing:# curl-x 127.0.0.1:80 2111.com.cn-ihttp/1.1 301 Moved Permanently status code 301Date:fri, APR 2018 12:17:18 GMTserver:apache/2.4.33 (Unix) php/7.1.6location:ht
to see if the rewrite module is loaded before testingNo loading is going to be loaded under Config fileVim/usr/local/apache2.4/conf/httpd.confEnter/rewite search to remove the # numberCheck the configuration file and reload, check if the rewrite module is loaded, and now load the-I is not displaying content, only show status codeThe following instructions jump to a successfulStatus Code display error 403, granted in config file changed to deniedVim/usr/local/apache2.4/conf/httpd.conf11.21
there is noThird, Apache access logAccess log records every request from a uservim/usr/local/apache2.4/conf/httpd.conf//Search LogformatLogformat "%h%l%u%t \"%r\ "%>s%b \"%{referer}i\ "\"%{user-agent}i\ "" combinedLogformat "%h%l%u%t \"%r\ "%>s%b" commonView logs for 111.comCat/usr/local/apache2.4/logs/111.com-access_logChange the virtual host configuration file
11.18 Apache user authentication11.19/11.20 Domain Jumphttpd.conf, delete the # in front of Rewrite_module (shared)Curl-x127.0.0.1:80-i 123.com//Status Code 30111.21 Apache Access LogChange the virtual host configuration file to the following:DocumentRoot "/data/wwwroot/lgx168.com"ServerName lgx168.comServeralias www.lgx168.comCustomlog "Logs/lgx168.com-access_lo
, hostname (domain name) is not www.123.com meet conditionRewriterule ^/(. *) $ http://www.123.com/$1 [r=301,l]//define rewrite rules that are not executed until the above conditions are met/usr/local/apache2/bin/apachectl-m|grep-i rewrite//Without this module, you need to edit the configuration file httpd.conf, delete the front of the Rewrite_module (shared) #Curl-x127.0.0.1:80-i 123.com//Status Code 30111.21 Configuring access LogsAccess
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.